package com.ruoyi.zhongchuangauto.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单邮件发送日志对象 order_mail_log
 * 
 * @author ruoyi
 * @date 2025-09-10
 */
public class OrderMailLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long logId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 邮件服务商回执ID */
    @Excel(name = "邮件服务商回执ID")
    private String msgId;

    /** 收件人，多个用;分号 */
    @Excel(name = "收件人，多个用;分号")
    private String receiver;

    /** 抄送 */
    @Excel(name = "抄送")
    private String cc;

    /** 密送 */
    @Excel(name = "密送")
    private String bcc;

    /** 主题 */
    @Excel(name = "主题")
    private String subject;

    /** 正文（HTML） */
    @Excel(name = "正文", readConverterExp = "H=TML")
    private String body;

    /** 附件[{name,path,size}] */
    @Excel(name = "附件[{name,path,size}]")
    private String attachmentJson;

    /** 模板编码 */
    @Excel(name = "模板编码")
    private String templateCode;

    /** 0待发送 1成功 2失败 */
    @Excel(name = "0待发送 1成功 2失败")
    private Integer status;

    /** 发送失败原因 */
    @Excel(name = "发送失败原因")
    private String errorMsg;

    /** 实际发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sendTime;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date createdAt;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date updatedAt;

    public void setLogId(Long logId) 
    {
        this.logId = logId;
    }

    public Long getLogId() 
    {
        return logId;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setMsgId(String msgId) 
    {
        this.msgId = msgId;
    }

    public String getMsgId() 
    {
        return msgId;
    }
    public void setReceiver(String receiver) 
    {
        this.receiver = receiver;
    }

    public String getReceiver() 
    {
        return receiver;
    }
    public void setCc(String cc) 
    {
        this.cc = cc;
    }

    public String getCc() 
    {
        return cc;
    }
    public void setBcc(String bcc) 
    {
        this.bcc = bcc;
    }

    public String getBcc() 
    {
        return bcc;
    }
    public void setSubject(String subject) 
    {
        this.subject = subject;
    }

    public String getSubject() 
    {
        return subject;
    }
    public void setBody(String body) 
    {
        this.body = body;
    }

    public String getBody() 
    {
        return body;
    }
    public void setAttachmentJson(String attachmentJson) 
    {
        this.attachmentJson = attachmentJson;
    }

    public String getAttachmentJson() 
    {
        return attachmentJson;
    }
    public void setTemplateCode(String templateCode) 
    {
        this.templateCode = templateCode;
    }

    public String getTemplateCode() 
    {
        return templateCode;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setErrorMsg(String errorMsg) 
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg() 
    {
        return errorMsg;
    }
    public void setSendTime(Date sendTime) 
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime() 
    {
        return sendTime;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("orderNo", getOrderNo())
            .append("msgId", getMsgId())
            .append("receiver", getReceiver())
            .append("cc", getCc())
            .append("bcc", getBcc())
            .append("subject", getSubject())
            .append("body", getBody())
            .append("attachmentJson", getAttachmentJson())
            .append("templateCode", getTemplateCode())
            .append("status", getStatus())
            .append("errorMsg", getErrorMsg())
            .append("sendTime", getSendTime())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
